package com.yc.spring_boot_04.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.jws.WebParam;


@Controller
public class MapController {

    String webUrl = "http://39.96.113.112:8066/api/data";

    @GetMapping("/top10")
    public String map(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "analyse.html";
    }

    @GetMapping("/school")
    public String school(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "analyse2.html";
    }


    @GetMapping("/outhubei")
    public String whmap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "analyse1.html";
    }

    @GetMapping("/hubei")
    public String hubeiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/hubeiMap";
    }

    @GetMapping("/xianggang")
    public String xiangguangMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/xianggangMap";
    }

    @GetMapping("/taiwan")
    public String taiwanMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/taiwanMap";
    }

    @GetMapping("/beijing")
    public String beijingMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/beijingMap";
    }

    @GetMapping("/guangdong")
    public String guangdongMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/guangdongMap";
    }

    @GetMapping("/shanghai")
    public String shanghaiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/shanghaiMap";
    }

    @GetMapping("/gansu")
    public String gansuMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/gansuMap";
    }

    @GetMapping("/zhejiang")
    public String zhejiangMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/zhejiangMap";
    }

    @GetMapping("/fujian")
    public String fujianMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/fujianMap";
    }

    @GetMapping("/shandong")
    public String shandongMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/shandongMap";
    }

    @GetMapping("/aomen")
    public String aomenMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/aomenMap";
    }

    @GetMapping("/shanxi")
    public String shanxiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/shanxiMap";
    }

    @GetMapping("/heilongjiang")
    public String heilongjiangMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/heilongjiangMap";
    }

    @GetMapping("/sichuan")
    public String sichuanMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/sichuanMap";
    }

    @GetMapping("/hebei")
    public String hebeiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/hebeiMap";
    }

    @GetMapping("/jiangsu")
    public String jiangsuMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/jiangsuMap";
    }

    @GetMapping("/guangxi")
    public String guangxiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/guangxiMap";
    }

    @GetMapping("/yunnan")
    public String yunnanMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/yunnanMap";
    }

    @GetMapping("/henan")
    public String henanMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/henanMap";
    }

    @GetMapping("/jiangxi")
    public String jiangxiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/jiangxiMap";
    }

    @GetMapping("/hainan")
    public String hainanMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/hainanMap";
    }

    @GetMapping("/tianjin")
    public String tianjinMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/tianjinMap";
    }

    @GetMapping("/hunan")
    public String hunanMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/hunanMap";
    }

    @GetMapping("/anhui")
    public String anhuiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/anhuiMap";
    }

    @GetMapping("/chongqing")
    public String chongqingMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/chongqingMap";
    }

    @GetMapping("/guizhou")
    public String guizhouMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/guizhouMap";
    }

    @GetMapping("/shanxi1")// 山西
    public String shanxi1Map(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/shanxi1Map";
    }

    @GetMapping("/liaoning")
    public String liaoningMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/liaoningMap";
    }

    @GetMapping("/jilin")
    public String jilinMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/jilinMap";
    }

    @GetMapping("/xinjiang")
    public String xinjiangMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/xinjiangMap";
    }

    @GetMapping("/ningxia")
    public String ningxiaMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/ningxiaMap";
    }

    @GetMapping("/neimenggu")
    public String neimengMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/neimengguMap";
    }

    @GetMapping("/qinghai")
    public String qinghaiMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/qinghaiMap";
    }

    @GetMapping("/xizang")
    public String xizangMap(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "map/xizangMap";
    }

    @GetMapping("/page1")
    public String page1(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "dashboard1";
    }

    @GetMapping("/main.html")
    public String inner(Model model) {
        model.addAttribute("webUrl", webUrl);
        return "table";
    }
}
